<!DOCTYPE html>
<html id="iframe">
	<head>
		<meta charset="UTF-8">
		
		<title>{:C('sitename')}</title>
		
		<meta name="renderer" content="webkit">
		<meta name="format-detection" content="telephone=no,email=no"/>
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
		<meta name="telephone=no"  content="format-detection">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="format-detection" content="telephone=no" />
		
		<META HTTP-EQUIV="Pragma" CONTENT="no-cache"> 
		<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache"> 
		<META HTTP-EQUIV="Expires" CONTENT="0">
		
		<link rel="stylesheet" type="text/css" href="__PUBLIC__/Home/css/lib.css"/>
		<link rel="stylesheet" type="text/css" href="__PUBLIC__/Home/css/public.css"/>
		<link rel="stylesheet" type="text/css" href="__PUBLIC__/Home/css/page.css"/>
	</head>
	<style>
		/*分页样式*/
		.pages a,.pages span {
		    display:inline-block;
		    padding:4px 7px;
		    margin:0 2px;
		    border:1px solid #D5D4D4;
		    -webkit-border-radius:1px;
		    -moz-border-radius:1px;
		    border-radius:1px;
		}
		html{
			width: 100%;
			height: 100%;
			overflow: auto;
		}
		.pages a,.pages li {
		    display:inline-block;
		    list-style: none;
		    text-decoration:none; color:#15AF11;
		}
		
		.pages a:hover{
		    border-color:#15AF11;
		}
		.pages span.current{
		    background:#15AF11;
		    color:#FFF;
		    font-weight:700;
		    border-color:#15AF11;
		}
		.pages{
			margin-top: 8px;
			text-align: center;
		}
		.tj{color:#000;}
		/*分页样式*/

		header {
			background: #d22727;
			height: 4.5em;
			padding: 1em 2% 0;
			text-align: center;
			position: fixed;
			top: 0;
			left: 0;
			width: 100%;
			z-index: 99999;

		}


		.ico02 {
			display: inline-block;
			height: 1.6em;
			width: 1.6em;
			background: url(ico/ico2.png) no-repeat;
			background-size: cover;
		}

		.fl {
			float: left;
			margin-left: .5em;
		}

		i {
			font-style: normal;
		}
		header h1 {
			font-size: 1.4em;
			display: inline-block;
			color: #fff;
			margin-left: -10px;
		}
		header .null {
			background-position: 0 -99em;
			margin-left: 0em;
		}

		.ico {
			display: inline-block;
			height: 1.6em;
			width: 1.6em;
			background: url(/public/home/img/ico.png) no-repeat;
			background-size: cover;
		}
		.back {
			/* background-position: 0 -1.6em; */
			background: url(/public/home/img/left.png);
			background-size: cover;
			margin-top: 4px;
		}
		.record-top .intro span{width:20%;}
		.record-top .intro span{text-align: left;}
		.record-top .lable a span{font-size: 16px;}
		.record-top .lable{margin-top: 30px;}
		.record-no {margin: 30px 0;padding: 0 10px;clear:both;}
	</style>
	<body>
	<header>
		<i class="ico02 back fl" onclick="history.go(-1)"></i>
		<h1>玩法规则</h1>
		<i class="ico null"></i>

	</header>
		<div class="record" style="    margin-top: 70px;">
			<div class="record-top">
				<p class="intro" style="border-bottom:#ccc solid 1px;padding-bottom:7px;">
					<span>会员:<i>{$userinfo.nickname}</i></span>
					<span>点数:<i>{$userinfo.points}</i></span>
					<span>编号:<i>PKW{$userinfo.id}</i></span>
				</p>
				<p class="lable">
					<a href="{:U('Home/Run/record')}?t=1"><span>{$today|date="m-d",###}</span></a>
					<a href="{:U('Home/Run/record')}?t=2"><span>{$today-86400|date="m-d",###}</span></a>
					<a href="{:U('Home/Run/record')}?t=3"><span>{$today-86400*2|date="m-d",###}</span></a>
					<a href="{:U('Home/Run/record')}?t=4"><span>账务</span></a>
				</p>
			</div>
			<div class="record-content">
				<empty name="list">
					<p class="record-no"><span>
						<if condition="$t eq 1">{$today|date="m-d",###}</if>
						<if condition="$t eq 2">{$today-86400|date="m-d",###}</if>
						<if condition="$t eq 3">{$today-86400*2|date="m-d",###}</if>
						 无资料
					</span></p>
					<else/>
					<if condition="$t eq 4">
						<table>
							<thead>
								<tr>
									<th>时间</th>
									<!--<th>单号</th>-->
									<th>期号</th>
									<th>内容</th>
									<th>点数</th>
									<th>盈亏</th>
									<!-- <th>余额</th> -->
								</tr>	
							</thead>
							<tbody>
								<volist name="list" id="vo">
									<tr>
										<td>{$vo.time|date="Y-m-d H:i:s",###}</td>
										<td>{$vo.number}</td>
										<!--<td>{$vo.time|mb_substr=3,8,utf8}</td>-->
										<td>{$vo.jincai}</td>
										<td>{$vo.add_points}</td>
										<td>{$vo['add_points']-$vo['del_points']}</td>
										
										<!-- <td>{$vo.balance}</td> -->
									</tr>
								</volist>
							</tbody>
						</table>
						<else/>
						<table>
							<volist name="list1" id="vo" key="i">
								<thead>
									<tr>
										<th colspan="6">
											<?php
												$periodnumber = $vo['number'];
												$awardnumbers = M('number')->where("periodnumber = $periodnumber")->order('id desc')->find();
												$data = explode(',',$awardnumbers['awardnumbers']);
												?>
											<span>
												<if condition="$vo['game'] eq 'xyft'">{:C('lang_xyft')}
												<elseif condition="$vo['game'] eq 'pk10'" />{:C('lang_pk10')}
												<elseif condition="$vo['game'] eq 'bj28_1'" />创投一线普通厅
												<elseif condition="$vo['game'] eq 'bj28_2'" />创投一线高级厅
												<elseif condition="$vo['game'] eq 'bj28_3'" />创投一线贵宾厅
												<elseif condition="$vo['game'] eq 'jnd28_1'" />创投二线普通厅
												<elseif condition="$vo['game'] eq 'jnd28_2'" />创投二线高级厅
												<elseif condition="$vo['game'] eq 'jnd28_3'" />创投二线贵宾厅
												<else/>{:C('lang_ssc')}</if>  
												期号：{$vo.number}

												<if condition="$vo['game'] eq 'xyft'">
													<if condition="$xyftnumber eq $vo['number']">
														(未开奖)
														<else/>
														(
														<volist name="data" id="y" key="i">
															<if condition="$i eq 10">
																{$y}
																<else/>
																{$y},
															</if>
														</volist>
														)	
													</if>
												
												<elseif condition="$vo['game'] eq 'bj28_1'" />
													<if condition="$bj28_1number eq $vo['number']">
														(未开奖)
														<else/>
														(
														<volist name="data" id="y" key="i">
															<if condition="$i eq 10">
																{$y}
																<else/>
																{$y},
															</if>
														</volist>
														)	
													</if>
												<elseif condition="$vo['game'] eq 'bj28_2'" />
													<if condition="$bj28_2number eq $vo['number']">
														(未开奖)
														<else/>
														(
														<volist name="data" id="y" key="i">
															<if condition="$i eq 10">
																{$y}
																<else/>
																{$y},
															</if>
														</volist>
														)	
													</if>
												<elseif condition="$vo['game'] eq 'bj28_3'" />
													<if condition="$bj28_3number eq $vo['number']">
														(未开奖)
														<else/>
														(
														<volist name="data" id="y" key="i">
															<if condition="$i eq 10">
																{$y}
																<else/>
																{$y},
															</if>
														</volist>
														)	
													</if>
												<elseif condition="$vo['game'] eq 'jnd28_1'" />
													<if condition="$jnd28_1number eq $vo['number']">
														(未开奖)
														<else/>
														(
														<volist name="data" id="y" key="i">
															<if condition="$i eq 10">
																{$y}
																<else/>
																{$y},
															</if>
														</volist>
														)	
													</if>
												<elseif condition="$vo['game'] eq 'jnd28_2'" />
													<if condition="$jnd28_2number eq $vo['number']">
														(未开奖)
														<else/>
														(
														<volist name="data" id="y" key="i">
															<if condition="$i eq 10">
																{$y}
																<else/>
																{$y},
															</if>
														</volist>
														)	
													</if>
												<elseif condition="$vo['game'] eq 'jnd28_3'" />
													<if condition="$jnd28_3number eq $vo['number']">
														(未开奖)
														<else/>
														(
														<volist name="data" id="y" key="i">
															<if condition="$i eq 10">
																{$y}
																<else/>
																{$y},
															</if>
														</volist>
														)	
													</if>
												<else/>
													<if condition="$sscnumber eq $vo['number']">
														(未开奖)
														<else/>
														(
														<volist name="data" id="y" key="i">
															<if condition="$i eq 10">
																{$y}
																<else/>
																{$y},
															</if>
														</volist>
														)	
													</if>
												</if>  
												
											</span>
											<!-- <if condition="$number eq $vo['number']"> -->
												<!-- <a class="bt bt-red" onclick="del_all('{$vo.number}')">全部取消</a> -->
											<!-- </if> -->
										</th>
									</tr>
								</thead>
								<thead>
									<tr>
										<th>竞猜时间</th>
										<th>竞猜单号</th>
										<th>内容</th>
										<th>点数</th>
										<th>盈亏</th>
									</tr>	
								</thead>
								<tbody>
									<volist name="vo.order" id="r">
										<tr>
											<td>{$r.time|date="H:i:s",###}</td>
											<td>{$r.id}</td>
											<td>{$r.jincai}</td>
											<td>{$r.del_points}</td>
											<td>
												<if condition="$r['game'] eq 'pk10'">
													<if condition="$pk10number eq $vo['number']">
														<if condition="C('is_cancel_order') eq '1'">
															<a class="bt bt-red" onclick="del('{$r.id}')">取消</a>
														</if>
													<elseif condition="$r['is_add'] eq 0" />
														<font color="red">未结算</font>
													<else/>
													{$r['add_points']-$r['del_points']}
													</if>
											
												<elseif condition="$r['game'] eq 'jnd28_1'"/>
													<if condition="$jnd28_1number eq $vo['number']">
														<if condition="C('is_cancel_order') eq '1'">
														<a class="bt bt-red" onclick="del('{$r.id}')">取消</a>
														</if>
														<elseif condition="$r['is_add'] eq 0" />
														<font color="red">未结算</font>
														<else/>
														{$r['add_points']-$r['del_points']}
													</if>
												<elseif condition="$r['game'] eq 'jnd28_2'"/>
													<if condition="$jnd28_2number eq $vo['number']">
														<if condition="C('is_cancel_order') eq '1'">
														<a class="bt bt-red" onclick="del('{$r.id}')">取消</a>
														</if>
														<elseif condition="$r['is_add'] eq 0" />
														<font color="red">未结算</font>
														<else/>
														{$r['add_points']-$r['del_points']}
													</if>
												<elseif condition="$r['game'] eq 'jnd28_3'"/>
													<if condition="$jnd28_3number eq $vo['number']">
														<if condition="C('is_cancel_order') eq '1'">
														<a class="bt bt-red" onclick="del('{$r.id}')">取消</a>
														</if>
														<elseif condition="$r['is_add'] eq 0" />
														<font color="red">未结算</font>
														<else/>
														{$r['add_points']-$r['del_points']}
													</if>

												<elseif condition="$r['game'] eq 'bj28_1'"/>
													<if condition="$bj28_1number eq $vo['number']">
														<if condition="C('is_cancel_order') eq '1'">
															<a class="bt bt-red" onclick="del('{$r.id}')">取消</a>
														</if>
														<elseif condition="$r['is_add'] eq 0" />
														<font color="red">未结算</font>
														<else/>
														{$r['add_points']-$r['del_points']}
													</if>
												<elseif condition="$r['game'] eq 'bj28_2'"/>
													<if condition="$bj28_2number eq $vo['number']">
														<if condition="C('is_cancel_order') eq '1'">
															<a class="bt bt-red" onclick="del('{$r.id}')">取消</a>
														</if>
														<elseif condition="$r['is_add'] eq 0" />
														<font color="red">未结算</font>
														<else/>
														{$r['add_points']-$r['del_points']}
													</if>
												<elseif condition="$r['game'] eq 'bj28_3'"/>
													<if condition="$bj28_3number eq $vo['number']">
														<if condition="C('is_cancel_order') eq '1'">
															<a class="bt bt-red" onclick="del('{$r.id}')">取消</a>
														</if>
														<elseif condition="$r['is_add'] eq 0" />
														<font color="red">未结算</font>
														<else/>
														{$r['add_points']-$r['del_points']}
													</if>
												</if>
												
											</td>
										</tr>
									</volist>
								</tbody>
							</volist>
						</table>
					</if>
				</empty>
			</div>
			<div class="tj" style="padding: 0 10px;margin-top: 30px;">
				<span>进项流水：<font color="red">{$points_tj['sum_add']|default='0'}</font></span>&nbsp;
				<span>出项流水：<font color="red">{$points_tj['sum_del']|default='0'}</font></span>&nbsp;
				<span>盈亏：<font color="red">{$points_tj['ying']}</font></span>&nbsp;
			</div>
			<div class="pages">
				{$show}
			</div>
		</div>


		<script src='//cdn.bootcss.com/jquery/1.11.3/jquery.js'></script>
		<script src="__PUBLIC__/layer/layer.js"></script>
		<script>
			function del(id){
				layer.open({
				    content: '您确定要取消吗？'
				    ,btn: ['确认', '取消']
				    ,yes: function(index){
				      	layer.close(index);
				      	$.ajax({
	                       	url: "{:U('Home/Run/del')}",
	                       	type: "post",
	                       	data:{'id':id},
	                       	dataType:'json',
	                       	error:function(){
	                       		parent.layer.open({content: '服务器开小差了~',skin: 'msg',time: 2});
		                    },
	                       	success:function(res){
	                       		location.href=location.href;
	                       	}
	                   	});
				    }
				});
			}
			// function del_all(number){
			// 	layer.open({
			// 	    content: '您确定要取消吗？'
			// 	    ,btn: ['确认', '取消']
			// 	    ,yes: function(index){
			// 	      	layer.close(index);
			// 	      	$.ajax({
	  //                      	url: "{:U('Home/Run/del_all')}",
	  //                      	type: "post",
	  //                      	data:{'number':number},
	  //                      	dataType:'json',
	  //                      	error:function(){
	  //                      		parent.layer.open({content: '服务器开小差了~',skin: 'msg',time: 2});
		 //                    },
	  //                      	success:function(res){
	  //                      		location.href=location.href;
	  //                      	}
	  //                  	});
			// 	    }
			// 	});
			// }
		</script>
		<script src="__PUBLIC__/Home/js/cls.js"></script>
	</body>
</html>
